package cn.alm.allinoneboot.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
@TableName("tb_category")
public class Category {

    private String id;
    private String name;
    private String description;
    private String parentId;
//    private String categoryPath;
//    private String parentPath;
    private List<Category> children = new ArrayList<>();
    private String createTime;
    private String updateTime;

    public void addChild(Category child) {
        this.children.add(child);
    }

}
